using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;

namespace GameLogic
{
    public class OpeningDropItem : MonoBehaviour,IDropHandler
    {
        [SerializeField]
        UnityEvent m_OnDrop;
        [SerializeField]
        GameObject m_ObjCheck;
        // Start is called before the first frame update
        void Start()
        {
        
        }

        // Update is called once per frame
        void Update()
        {

        }
        public void OnDrop(PointerEventData eventData)
        {
            if(m_ObjCheck == eventData.selectedObject)
            {
                eventData.selectedObject = null;
                m_OnDrop.Invoke();
            }
        }
    }
}
